package com.eddie.facade;

/**
 * Popcorn 子系统
 * @author Eddie
 * @date 2022/08/02 09:17
 **/
public class Popcorn {


    //单例模式,饿汉式
    private Popcorn() {

    }

    private static final Popcorn instance = new Popcorn();

    public static Popcorn getInstance() {
        return instance;
    }

    public void on() {
        System.out.println("Popcorn打开了");
    }

    public void off() {
        System.out.println("Popcorn关闭了");
    }

    public void play() {
        System.out.println("Popcorn正在制作爆米花");
    }

}
